<%-- 
    Document   : PaginaArea
    Created on : 02/12/2013, 23:11:23
    Author     : Edmilson
--%>

<%@page import="java.util.ArrayList"%>
<%@page import="br.edu.ifrn.Classes.Area"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<jsp:useBean id="areas" scope="session" type="java.util.List" beanName="area"></jsp:useBean>
    <!DOCTYPE html>
    <html>
        <head>
            <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
            <link rel="stylesheet" href="css/main.css" type="text/css" media="screen, projection, tv" />
            <link rel="stylesheet" href="css/responsive.css" type="text/css" media="print" />
            <title>Area</title>
        </head>
        <body>
        <%@include file="../Paginas/cabecalho.jsp" %>
        <div class="main">
            <!-- left column -->
            <div class="left">

                <!-- block element -->
                <div class="block">
                    <h3 class="head">Header</h3>
                    <div>
                        <!-- InstanceBeginEditable name="EditRegion2" -->
                        <table>
                            <tr>
                                <th>Nome</th>
                                <th>Descrição</th>
                            </tr>
                            <%
                                for (Area area : (ArrayList<Area>) areas) {

                            %>
                            <tr>
                                <td><%= area.getNomeArea()%></td>
                                <td><%= area.getDescricaoArea()%></td>
                                <td><a href="GerenciarArea?acao=RemoverArea&idArea=<%= area.getIdArea()%>">Excluir</a></td>
                                <td><a href="Adm/EditaArea.jsp?acao=EditarArea&idArea=<%= area.getIdArea()%>&nomeArea=<%=area.getNomeArea()%>&descricaoArea=<%=area.getDescricaoArea()%>">Editar</a></td>
                            </tr>
                            <%
                                }
                            %>
                        </table>
                        <form action="GerenciarArea?acao=InserirArea" method="post">
                            <fieldset title="Cadastro de Aréa">
                                <label>Nome:</label>
                                <input type="text" name="nomeArea" />
                                <br />
                                <br />
                                <label>Descrição:</label>
                                <br />
                                <textarea name="descricaoArea" cols="40" rows="10"></textarea>
                                <br />
                                <br />
                                <input type="submit" name="btnCadastrar" value="Cadastrar" />
                            </fieldset>
                        </form>
                    </div>
                    <h3 class="foot">Footer</h3>
                </div>

                <div class="block">
                    <h3 class="head head_a">Header A</h3>
                    <div>Some extra content</div>
                    <h3 class="foot foot_a">Footer A</h3>
                </div>

                <div class="block block_a">
                    <h3 class="head">Header</h3>
                    <div>Block A: Some extra content</div>
                    <h3 class="foot">Footer</h3>
                </div>
            </div>
        </div>


        <%@include file="../Paginas/rodape.jsp" %>


    </body>
</html>
